package com.tpyule.tpclass.dao;

import com.tpyule.tpclass.entity.pojo.Chapter;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @author zzz
 * @version 1.0
 * @date 2020/3/29 13:06
 */
@Mapper
public interface ChapterDao {

    /**
     * 添加章节
     * @param chapter
     */
    public int addChapter(Chapter chapter);

    /**
     * 更新章
     * @param chapter
     */
    public int updateChapter(Chapter chapter);

    public Chapter getLastChapter(String courseId);

    public List<Chapter> getListChapter(String courseId);

    /**
     * 删除后更新大的章节的sort
     * @param chapter
     * @return
     */
    public int updateBigChapter(Chapter chapter);
}
